package yt.kpool.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.king.base.adapter.ViewHolderAdapter;
import com.king.base.adapter.holder.ViewHolder;

import java.util.List;

import yt.kpool.R;
import yt.kpool.bean.GuestChildAountBean;
import yt.kpool.bean.RecommendCustomersBean;
import yt.kpool.util.Util;


/**
 * 客户子账户适配器
 * Created by Administrator on 2017/7/17.
 */

public class GuestChildAountListviewAdapter extends ViewHolderAdapter<GuestChildAountBean.DataBean> {

    private String blanceunit;//余额单位
    public GuestChildAountListviewAdapter(Context context, List<GuestChildAountBean.DataBean> listData) {
        super(context, listData);
    }

    @Override
    public View buildConvertView(LayoutInflater layoutInflater, GuestChildAountBean.DataBean dataBean, int position) {
        return layoutInflater.inflate(R.layout.item_guest_child_aount_layout,null);
    }

    @Override
    public void bindViewDatas(ViewHolder holder, GuestChildAountBean.DataBean dataBean, int position) {
        holder.setText(R.id.tv_name,dataBean.getChildAccountName());

        holder.setText(R.id.tv_num, Util.FormatHashrate(dataBean.getHashrate())+"");
        holder.setText(R.id.tv_blance, Util.GetNumber(dataBean.getBalance() + ""));
        holder.setText(R.id.tv_blanceunit, getBlanceunit());

    }

    public String getBlanceunit() {
        return blanceunit;
    }

    public void setBlanceunit(String blanceunit) {
        this.blanceunit = blanceunit;
    }

}
